﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/Private/SiteAdmin.Master" AutoEventWireup="true"
    CodeBehind="UserForm.aspx.cs" Inherits="Obligatorio2013.UserForm" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript">
        function ValidaNombre(sender, args) {
            args.IsValid = false;
            var reg = new RegExp("^([a-z ñáéíóú]{2,60})$");
            if (reg.test(args.Value)) {
                args.IsValid = true;
            }
        } 
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Label ID="lblController" runat="server" Text=""></asp:Label>
    <asp:Panel ID="Panel1" runat="server" GroupingText="User Registration" Height="300px"
        Width="350px">
        <asp:Label ID="lblName" runat="server" Width="70px" Text="Nombre"></asp:Label>
        <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="nameValidator" runat="server" Display="Dynamic" ControlToValidate="txtName"
            ErrorMessage="Nombre es un campo requerido">*</asp:RequiredFieldValidator>
        <br />
        <br />
        <asp:Label ID="lblLastName" runat="server" Width="70px" Text="Apellido"></asp:Label>
        <asp:TextBox ID="txtLastName" runat="server" Width="200px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="lastNameValidator" runat="server" Display="Dynamic"
            ControlToValidate="txtLastName" ErrorMessage="Apellido es un campo requerido">*</asp:RequiredFieldValidator>
        <br />
        <br />
        <asp:Label ID="lblAddress" runat="server" Width="70px" Text="Direccion"></asp:Label>
        <asp:TextBox ID="txtAddress" runat="server" Width="200px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="addressValidator" runat="server" Display="Dynamic"
            ControlToValidate="txtAddress" ErrorMessage="Direccion es un campo requerido">*</asp:RequiredFieldValidator>
        <br />
        <br />
        <asp:Label ID="lblLocation" runat="server" Width="70px" Text="Localidad"></asp:Label>
        <asp:TextBox ID="txtLocation" runat="server" Width="200px"></asp:TextBox>
        <br />
        <br />
        <asp:Label ID="lblPhone" runat="server" Width="70px" Text="Telefono"></asp:Label>
        <asp:TextBox ID="txtPhone" runat="server" Width="200px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="phoneVAlidator" runat="server" Display="Dynamic"
            ControlToValidate="txtPhone" ErrorMessage="Telefono es un campo requerido">*</asp:RequiredFieldValidator>
        <br />
        <br />
        <asp:Label ID="lblEmail" runat="server" Width="70px" Text="Email"></asp:Label>
        <asp:TextBox ID="txtEmail" runat="server" Width="200px"></asp:TextBox>
        <asp:RequiredFieldValidator ID="emailValidator" runat="server" Display="Dynamic"
            ControlToValidate="txtEmail" ErrorMessage="Email es un campo requerido">*</asp:RequiredFieldValidator>&nbsp;
        <asp:RegularExpressionValidator ID="emailCheck" runat="server" ControlToValidate="txtEmail"
            ErrorMessage="Formato de correo no valido" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">**</asp:RegularExpressionValidator>
        <br />
        <br />
        <asp:Label ID="lblUser" runat="server" Width="70px" Text="Usuario"></asp:Label>
        <asp:TextBox ID="txtUser" runat="server" Width="200px"></asp:TextBox>
        <br />
        <br />
        <asp:Label ID="lblPass" runat="server" Width="70px" Text="Contrasena"></asp:Label>
        <asp:TextBox ID="txtPass" runat="server" TextMode="password" Width="200px"></asp:TextBox>
        <br />
        <br />
        <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" 
            Text="Guardar" />
        &nbsp;
        <asp:Button ID="btnCancel" runat="server" Text="Cancelar" CausesValidation="false"
            OnClick="btnCancel_Click" />
        <asp:Label ID="lblMensaje" runat="server" Style="text-align: justify"></asp:Label>
            <blockquote dir="ltr" style="margin-right: 0px">
                <p>
                    &nbsp;<asp:ValidationSummary ID="vsResumen" runat="server" Width="487px" HeaderText="Resumen de Errores"
                        Style="text-align: justify"></asp:ValidationSummary>
                </p>
            </blockquote>
    </asp:Panel>
    <br />
</asp:Content>
